package com.repair.worker.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.repair.worker.pojo.entity.Worker;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author 张强
 * @since 2024-09-13
 */
public interface WorkerMapper extends BaseMapper<Worker> {
    List<Worker> selectWorkers(@Param("nickname") String nickname,
                               @Param("phone") String telephone,
                               @Param("workerLevel") String workerLevel,
                               @Param("workerStatus") String workerStatus,
                               @Param("authenticationStatus") Integer authenticationStatus,
                               @Param("createTimeMin") LocalDateTime createTimeMin,
                               @Param("createTimeMax") LocalDateTime createTimeMax,
                               @Param("totalAmountMin") BigDecimal totalAmountMin,
                               @Param("totalAmountMax") BigDecimal totalAmountMax,
                               @Param("receivedOrderSumMin") BigDecimal receivedOrderSumMin,
                               @Param("receivedOrderSumMax") BigDecimal receivedOrderSumMax,
                               @Param("id") Long id,
                               @Param("offset") Integer offset,
                               @Param("pageSize") Integer pageSize);

    int countWorkers(@Param("nickname") String nickname,
                     @Param("phone") String phone,
                     @Param("workerLevel") String workerLevel,
                     @Param("workerStatus") String workerStatus,
                     @Param("authenticationStatus") Integer authenticationStatus,
                     @Param("createTimeMin") LocalDateTime createTimeMin,
                     @Param("createTimeMax") LocalDateTime createTimeMax,
                     @Param("totalAmountMin") BigDecimal totalAmountMin,
                     @Param("totalAmountMax") BigDecimal totalAmountMax,
                     @Param("receivedOrderSumMin") BigDecimal receivedOrderSumMin,
                     @Param("receivedOrderSumMax") BigDecimal receivedOrderSumMax,
                     @Param("id") Long id);
}
